package com.zzty.training.service.impl;

import com.zzty.training.dao.UserDao;
import com.zzty.training.entity.User;
import com.zzty.training.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    UserDao userDao;
    @Override
    public User getUserByNameOrEmail(User user) {
        User user1=userDao.getUserByNameOrEmail(user);
        return user1;
    }

    @Override
    public Integer addUser(User user) {
        Integer logs=userDao.addUser(user);
        return logs;
    }

    @Override
    public User getUserByName(User user) {
        User user1=userDao.getUserByName(user);
        return user1;
    }
    @Override
    public Integer updateUser(User user){
        Integer result=userDao.updateUser(user);
        return result;
    }
}
